diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2025-11-30 11:50:29 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2025-11-30 11:50:29 +0200 |
| commit | 5c1f0e17b8b0e9ebba6078854c1224e7f5d93ac2 (patch) | |
| tree | 00412c3090e0fb48cccc074d02f0afffee9bbcc5 /templates/etc_jail.conf.d_[jailname].conf.j2 | |
| parent | 28379e016d4ab80a0d0529d6ca08083c75a0be4d (diff) | |
pf changes
Diffstat (limited to 'templates/etc_jail.conf.d_[jailname].conf.j2')
| -rw-r--r-- | templates/etc_jail.conf.d_[jailname].conf.j2 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/etc_jail.conf.d_[jailname].conf.j2 b/templates/etc_jail.conf.d_[jailname].conf.j2 index a12226d..3e11e4f 100644 --- a/templates/etc_jail.conf.d_[jailname].conf.j2 +++ b/templates/etc_jail.conf.d_[jailname].conf.j2 @@ -22,12 +22,14 @@ exec.poststart += "jexec ${name} ifconfig epl{{ jail.num }}b up"; exec.poststart += "ifconfig epl{{ jail.num }}a up"; exec.poststart += "jexec ${name} ifconfig epl{{ jail.num }}b 192.168.2.{{ jail.num }}/16"; + exec.poststart += "jexec ${name} route delete default || echo 'No default route to delete'"; + {% if jail.name != "ingress" %} {% for ing in jails -%} {% if ing.name == "ingress" -%} exec.poststart += "jexec ${name} route add default 192.168.2.{{ ing.num }} || echo 'Failed to add default route'"; {% endif %} {% endfor %} - {% if jail.name == "ingress" -%} + {% else %} exec.poststart += "ifconfig epw{{ jail.num }}b vnet ${name}"; exec.poststart += "jexec ${name} ifconfig epw{{ jail.num }}b up"; exec.poststart += "ifconfig epw{{ jail.num }}a up"; |
